<template>
  <div class="delcall">
    <el-dialog
      :modal="false"
      :show-close="false"
      :visible.sync="deldialog"
      width="500px"
    >
      <template slot="title">
        <div class="tishi">
          <span>提示</span>
        </div>
      </template>
      <div style="text-align: center">
        <img
          src="../../assets/img2/icon_caution@2x.png"
          alt=""
          style="width: 40px;height: 40px"
        />
      </div>
      <div class="title2">
        确定要删除此条数据吗？
      </div>
      <div style="text-align: center">
        <el-button
          @click="deletedata"
          style="background-color:#f2423d;color: white;font-size:14px;margin-bottom: 15px;border: none"
          >删 除
        </el-button>
        <el-button
          @click="cancelbtn"
          style="border: none;background-color:#d8d8d8;font-size: 14px;color: #666666"
          >取 消
        </el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  name: "Deletetk",
  data() {
    return {
      //  dialogVisible:false
      deldialog: false,
      delid: "",
    };
  },
  // props: {
  //   deldialog: {
  //     type: Boolean,
  //   },
  // },
  // watch: {
  //   deldialog: {
  //     handler(val, oldVal) {
  //       console.log(val);
  //     },
  //     deep: true, //true 深度监听
  //   },
  // },
  methods: {
    delshow(id) {
      console.log(id);
      this.delid = id;
      this.deldialog = true;
    },
    deletedata() {
      this.$emit("deletesuccess", this.delid);
      this.deldialog = false;
    },
    cancelbtn() {
      this.deldialog = false;
    },
  },
  mounted() {},
  beforeDestroy() {},
};
</script>

<style scoped lang="scss">
.title2 {
  font-size: 16px;
  font-weight: 400;
  text-align: center;
  color: #666666;
  margin: 30px 0 30px 0;
}

button {
  height: 32px;
  line-height: 0;
  width: 100px;
  margin: 0 40px 20px 40px;
  color: #666666;
}
</style>
<style lang="scss">
.delcall {
  .el-dialog__header {
    border-bottom: 1px solid #f5f5f5;
  }
  .el-dialog__body {
    padding-bottom: 0;
  }
}
</style>
